<?php

use admin\assets\AppAsset;
use yii\helpers\Html;
//use yii\bootstrap\Nav;
//use yii\bootstrap\NavBar;
//use yii\widgets\Breadcrumbs;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;

AppAsset::register($this);
$this->title = "享点APP";
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?php echo Yii::$app->language ?>">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo Yii::$app->charset ?>" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="renderer" content="webkit">
        <?= Html::csrfMetaTags() ?>
        <title><?= Html::encode($this->title) ?>-后台管理</title>
        <?php $this->head() ?>
        <link href="<?php echo Yii::$app->homeUrl; ?>css/common/base.css" rel="stylesheet">
        <link rel="stylesheet" href="<?php echo Yii::$app->homeUrl; ?>css/common/bootstrap.min.css">
        <link href="<?php echo Yii::$app->homeUrl; ?>css/login.css" rel="stylesheet">
    </head>

    <body>
        <?php $this->beginBody() ?>
        <article class="center">
            <header class="login">
                后台管理系统
            </header>
            <aside>
                <ul class="ul">
                    <li>登录</li>
                    <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
                    <?php echo $form->field($model, 'username', ['template' => "<div class=\"field field-icon-right\">{input}<span class=\"icon icon-user\"></span></div>{error}"])->textInput(['placeholder' => '登录账号']) ?>
                    <?php
                    echo $form->field($model, 'password_hash', ['template' => "<div class=\"field field-icon-right\">{input}<span class=\"icon icon-key\"></span></div>{error}"]
                    )->passwordInput([
                        'placeholder' => '登录密码'
                    ])
                    ?>
                    <?php
                    echo $form->field($model, 'verifyCode')->widget(Captcha::className(), [
                        'captchaAction' => 'site/captcha',
                        'options' => ['class' => 'form-control', 'placeholder' => '填写右侧的验证码'],
                        'template' => "<div class=\"field\">{input}{image}</div>",
                        'imageOptions' => ['class' => 'passcode', 'width' => "80", 'height' => '48', 'alt' => '验证码'],
                    ])->label(false);
                    ?>
                    <div class="form-group">
                        <?php echo Html::submitButton('立即登录后台', ['class' => 'button but', 'name' => 'login-button']) ?>
                    </div>
                    <?php ActiveForm::end(); ?>						
                </ul>
            </aside>
        </article>
        <?php $this->endBody() ?>
    </body>
</html>
<?php $this->endPage() ?>